/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_Studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once

#include "../节点.h"
//#include "../../插座/C_物体插座.h"
#include <atomic>
#include <thread>



typedef struct {
	S_结构对象指针		m_网络监听;
	S_结构对象指针		m_接收数据地址;
	int32				m_接收数据量;
}S_网络监听;


class C_UDP接收节点 : public C_节点基类 {
	S_结构对象指针		m_网络监听;
	S_结构对象指针		m_接收数据地址;
	int32				m_接收数据量;
public:
	C_UDP接收节点();
	~C_UDP接收节点();

	bool		f_update();

};






class C_UDP接收图像节点 : public C_节点基类 {
	
public:
	C_UDP接收图像节点();
	~C_UDP接收图像节点();

	S_网络监听			m_网络;
	std::thread			m_线程;
	std::atomic_bool	m_写入记录;
	bool				m_运行线程;
	std::vector<S_RGB8UI>	m_像素;



	S_Props		m_PropISO;
	S_Props		m_Prop亮度;
	S_Props		m_Prop帧数;
	S_Props		m_Prop对比度;
	S_Props		m_Prop饱和度;

	float32		m_ISO;
	float32		m_亮度;
	float32		m_帧数;
	float32		m_对比度;
	float32		m_饱和度;

	
	//float32		m_快门速度;

	bool		f_update();

};












C_节点基类* f_node_UDP接收节点(S_设备环境& ctx, FILE* f);
C_节点基类* f_node_UDP接收图像节点(S_设备环境& ctx, FILE* f);






